top = self = window = global;
__process = process
// delete process;

parent = window
innerWidth = 1192
innerHeight = 1272
outerWidth = 2560
outerHeight = 1359
screenX = 0
screenY = 0
devicePixelRatio = 1.5
isSecureContext = true
locationbar = {
    visible: true,
}
toolbar = {
    visible: true,
}

span = {
    classList: [],
}

ctx_attr = {
    "alpha": true,
    "colorSpace": "srgb",
    "desynchronized": false,
    "willReadFrequently": "undefined"
}

ctx = {
    rect: function (x, y, w, h) {
        console.log("canvas rect: ", x, y, w, h);
    },
    getContextAttributes: function () {
        console.log('ctx getAttributes')
        return ctx_attr;
    },
    isPointInPath: function (path, x, y) {
        console.log('ctx isPointInPath: ', path, x, y);
        return false;
    },
    fillRect: function (x, y, w, h) {
        console.log('ctx fillRect: ', x, y, w, h);
    },
    fillText: function (text, x, y) {
        console.log('ctx fillText: ', text, x, y);
    },
    beginPath: function () {},
    arc: function (x, y, radius, start, end) {
        console.log('ctx arc: ', x, y, radius, start, end);
    },
    closePath: function () {},
    fill: function (path) {
        console.log('ctx fill: ', path);
    },
}

canvas = {
    getContext: function (id) {
        if(id == 'webgl') {
            return null;
        }
        return ctx
    },
    style: {},
    toDataURL: function () {
        return 'BASE64url'
    }
}

document = {
    all : {},
   
    documentElement: {},
    createEvent(eventInterface) {
    },
    addEventListener(type, listener, options) {
    },
    characterSet: 'UTF-8',
    compatMode: 'CSS1Compat',
    images: [{}, {}, {}],
}

navigator = {
    userAgent: "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36",
    cookieEnabled: true,
    plugins: [{},{},{},{},{}],
    hardwareConcurrency: 20,
    vendor: "Google Inc.",
    appCodeName: "Mozilla",
    appName: "Netscape",
    appVersion: "5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36",
    bluetooth: {},
    deviceMemory: 8,
    doNotTrack: null,
    language: "zh-CN",
    languages: ['zh-CN'],
    maxTouchPoints: 0,
    platform: "Win32",
    product: "Gecko",
    productSub: "20030107",
    storage: {},
    vendorSub: "",
    webdriver: false,
}


screen = {
    height: 1440,
    width: 2560,
    colorDepth: 30,
    pixelDepth: 30,
    availHeight: 1359,
    availWidth: 2560,
    availTop: 0,
    availLeft: 0,
}

window.requestAnimationFrame = (callback) => {}

window._sdkGlueVersionMap = {
    "sdkGlueVersion": "1.0.0.62",
    "bdmsVersion": "1.0.1.17",
    "captchaVersion": "4.0.8"
}
window.XMLHttpRequest = require('xmlhttprequest').XMLHttpRequest
XMLHttpRequest.prototype = new XMLHttpRequest()
// Image = require("node-js-image")

AudioContext = function () {}
addEventListener = function () {}
dispatchEvent = function () {}
CSSRuleList = function () {}
CSSStyleDeclaration = function () {}
CSSValueList = function () {}
ClientRectList = function () {}
DOMRectList = function () {}
DOMStringList = function () {}
DOMTokenList = function () {}
DataTransferItemList = function () {}
FileList = function () {}
HTMLAllCollection = function () {}
HTMLCollection = function () {}
HTMLFormElement = function () {}
HTMLSelectElement = function () {}
MediaList = function () {}
NamedNodeMap = function () {}
NodeList = function () {}
PaintRequestList = function () {}
postMessage = function () {}
SVGLengthList = function () {}
SVGNumberList = function () {}
SVGPathSegList = function () {}
SVGPointList = function () {}
SVGStringList = function () {}
SVGTransformList = function () {}
SourceBufferList = function () {}
StyleSheetList = function () {}
TextTrackCueList = function () {}
TextTrackList = function () {}
TouchList = function () {}
MutationObserver = function () {}
PromiseRejectionEvent = function () {}
EventSource = function () {}
setTimeout = function () {return function (){}}
setInterval = function () {}
webkitRequestAnimationFrame = function () {}
alert = function () {}
// function BluetoothUUID () {}


credentials = {}
body = {
    clientWidth: 1192,
    clientHeight: 1272,
}
// setProxyArr(['globalThis', "window", "document", "navigator", 'global', 'location', 'screen', 'span', 'canvas', "ctx", 'sessionStorage', 'localStorage', 'indexedDB', 'history', 'credentials', 'body', 'orientation']);
navigator.credentials = credentials
document.body = body